import { http } from "@/plugins/axios/index.ts";

interface User {
  name: string;
  age: number;
  avatar: string;
}

export async function get() {
  return http.request<User>({
    url: "get",
  });
}

interface loginInterface {
  token: string;
}
// 登录api
export async function loginApi(data:{account:string | number ,password:string | number}) {
  return http.request<loginInterface>({
    url: "login",
    data,
    method:'post'
  });
}
